package com.service.demo;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RequestMapping("/product")
@RestController
@Slf4j
public class ProductController {
    @Autowired
    private ProductMapper mapper;
    @RequestMapping("/{id}")
    ProductInfo selectPro(@PathVariable("id") Integer id){
        log.info("接收到参数id :{}", id);
        return mapper.selectProductById(id);
    }
}
